package com.das.mechanic_base.utils;

import com.das.mechanic_base.bean.main.CrmCarQuetionBean;

import java.util.Comparator;

public class PinyinForCarQuestionComparator implements Comparator<CrmCarQuetionBean.SubItemList> {

    @Override
    public int compare(CrmCarQuetionBean.SubItemList brandBean, CrmCarQuetionBean.SubItemList afterBrandBean) {
        //这里主要是用来对ListView里面的数据根据ABCDEFG...来排序
        if ("#".equals(afterBrandBean.sortLetters)) {
            return -1;
        } else if ("#".equals(brandBean.sortLetters)) {
            return 1;
        } else {
            return brandBean.sortLetters.compareTo(afterBrandBean.sortLetters);
        }
    }

}
